<template>
	<view class="my-search-container" :style="{ 'background-color':bgColor }" @click="searchHandler">
		<view class="my-search-box" :style="{'border-radius': borderRadius + 'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="search-title">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			// 背景颜色
			bgColor: {
				type: String,
				default: '#ff93a7'
			},
			borderRadius: {
				type: Number,
				default: 50
			}
		},
		name: "my-search",
		data() {
			return {
				
			};
		},
		methods: {
			searchHandler() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
	.my-search-container {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 100rpx;
		// background-color: #ff93a7;
		.my-search-box {
			width: 95%;
			height: 75rpx;
			background-color: #ffffff;
			// border-radius: 25px;
			text-align: center;
			line-height: 80rpx;
			.search-title {
				font-size: 15px;
				font-weight: bold;
				margin-left: 8rpx;
			}
		}
	}
</style>